import logo from './logo.svg';
import './App.css';
import {First} from './views/First';
import {Second} from './views/Second';
import {Third} from './views/Third';
import {HashRouter, Link, Redirect, Route, Switch} from 'react-router-dom';
function App() {
  return (
    <HashRouter>
      <nav>
      <div>
        <Link to={'/first'}>first</Link>
      </div>
      <div>
        <Link to={'/second'}>second</Link>
      </div>
      <div>
        <Link to={'/third'}>third</Link>
      </div>
          <div>
              <Link to={'/second/third/fourth'}>fourth</Link>
          </div>
    </nav>
        <div>
            <h1>渲染区域</h1>
            <Switch>
                <Redirect from={'/'} to={'/a'}/>
                <Route path="/first"  component={First} />
                <Route path="/second" component={Second} />
                <Route path="/third" component={Third} />
                <Route path="/second/third/fourth" component={Third} />
                <Redirect to={'/'} />
                {/*<Route path="*" component={Third} />*/}
            </Switch>
        </div>
    </HashRouter>
  );
}

export default App;
